package com.itheima.domain;

import java.io.Serializable;
//一个对象想要可以被序列化  必须实现 Serializable
public class User  implements Serializable{
    //serialVersionUID  序列号  串行好serialVersionUID
    private static final long serialVersionUID=10L;
    private String username;
    public  String password;//s
    private transient int age;//不想让程序序列化  瞬时


    public User() {
    }

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
